<?php
require("/model/CityModel.class.php");
class CityController
{
    var $db;

    function __construct($db_link)
    {
        $this->db = $db_link;
    }

    function getAllCitiesInCountry($id)
    {
        $c = new CityModel($this->db);
        return $c->getAllCitiesInCountry($id);
    }

    function addCity($city)
    {
        $c = new CityModel($this->db);
        return $c->addCity($city);
    }

    function getCityName($city_id)
    {
        $c = new CityModel($this->db);
        return $c->getCityName($city_id);
    }

    function deleteCity($city_id)
    {
        $c = new CityModel($this->db);
        return $c->deleteCity($city_id);
    }

    function updateCity($city)
    {
        $c = new CityModel($this->db);
        return $c->updateCity($city);
    }
}
?>